const { DataTypes } = require('sequelize');
const { sequelize } = require('../services/dbHelper');

var student = sequelize.define(
    'student',
    {
        studentId: {
            field: 'id',
            primaryKey: true,
            type: DataTypes.INTEGER,
            allowNull: false
        },
        studentName: {
            field: 'name',
            type: DataTypes.STRING,
            allowNull: true
        },
        studentSex: {
            field: 'sex',
            type: DataTypes.STRING,
            allowNull: true
        }
    },
    {
        tableName: 't_student',
        timestamps: false,
        freezeTableName: true
    }
)

module.exports = student;